<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>Document</title>
    <style>
        h1{
            color: red;
        }
        .c1{
            color: green;
        }
        #d1{
            color: blue;
        }
        div h1{
            color: orange;
        }
        div .c1{
            color: gray;
        }
        #box h1{
            color: black;
        }
        #box .c1{
            color: pink;
        }
    </style>

</head>
<body>
    <div id="box">
        <h1 class="c1" id="d1">一级标题</h1>
    </div>
</body>
</html>